import Vue from 'vue'
import VueRouter from 'vue-router'
import Kepu from '../views/Kepu.vue'
import Souye from '../views/Souye.vue'
import Me from '../views/Me.vue'
import ceshi from '../views/ceshi.vue'
import login from '../views/Login.vue'
import register from '../views/Register.vue'
import setup from '../views/me/Setup.vue'
import yuyue from '../views/Yuyue.vue'
import nodfind from '../components/Nodfind.vue'
import choujiang from '../components/Choujiang.vue'
import article from '../views/Article.vue'
import about from '../views/About.vue'

Vue.use(VueRouter)

const routes = [
  // about
  {
    path: '/about',
    name: 'about',
    component: about
  },
  // choujiang
  {
    path: '/choujiang',
    name: 'choujiang',
    component: choujiang
  },
  // article
  {
    path: '/article',
    name: 'article',
    component: article
  },
  //yuyue
  {
    path: '/yuyue',
    name: 'yuyue',
    meta: { permisson:true },
    component: yuyue
  },
  //404
  {
    path: '*',
    name: 'nodfind',
    component: nodfind
  },
  //setup
  {
    path: '/setup',
    name: 'setup',
    component: setup
  },
  //register
  {
    path: '/register',
    name: 'register',
    component: register
  },
  //Login
  {
    path: '/login',
    name: 'login',
    component: login
  },
  //ceshi
  {
    path: '/ceshi',
    name: 'ceshi',
    component: ceshi
  },
  //me
  {
    path: '/me',
    name: 'Me',
    component: Me
  },
  //Kepu
  {
    path: '/kepu',
    name: 'Kepu',
    component: Kepu
  },
  //Souye
  {
    path: '/',
    name: 'Souye',
    component: Souye
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
